<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: uri.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('uri_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">uri.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;coap_config.h&quot;</code><br />
<code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;ctype.h&gt;</code><br />
<code>#include &quot;<a class="el" href="libcoap_8h_source.html">libcoap.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="mem_8h_source.html">mem.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="coap__debug_8h_source.html">coap_debug.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="pdu_8h_source.html">pdu.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="option_8h_source.html">option.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="uri_8h_source.html">uri.h</a>&quot;</code><br />
</div>
<p><a href="uri_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcnt__str.html">cnt_str</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a68adaae0c5438602147af6219cef3e9d" id="r_a68adaae0c5438602147af6219cef3e9d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a68adaae0c5438602147af6219cef3e9d">ISEQUAL_CI</a>(a,  b)&#160;&#160;&#160;  ((a) == (b) || (islower(b) &amp;&amp; ((a) == ((b) - 0x20))))</td></tr>
<tr class="separator:a68adaae0c5438602147af6219cef3e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a927de43a184102d0ee35c806be35999d" id="r_a927de43a184102d0ee35c806be35999d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a927de43a184102d0ee35c806be35999d">hexchar_to_dec</a>(c)</td></tr>
<tr class="memdesc:a927de43a184102d0ee35c806be35999d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates decimal value from hexadecimal ASCII character given in <code>c</code>.  <br /></td></tr>
<tr class="separator:a927de43a184102d0ee35c806be35999d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6afabdc09a49a433ee19d8a9486056d" id="r_ac6afabdc09a49a433ee19d8a9486056d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#ac6afabdc09a49a433ee19d8a9486056d">min</a>(a,  b)&#160;&#160;&#160;((a) &lt; (b) ? (a) : (b))</td></tr>
<tr class="separator:ac6afabdc09a49a433ee19d8a9486056d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7d65118c715792eb89f8fe03a45e210" id="r_ae7d65118c715792eb89f8fe03a45e210"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#ae7d65118c715792eb89f8fe03a45e210">URI_DATA</a>(uriobj)&#160;&#160;&#160;((unsigned char *)(uriobj) + sizeof(<a class="el" href="structcoap__uri__t.html">coap_uri_t</a>))</td></tr>
<tr class="separator:ae7d65118c715792eb89f8fe03a45e210"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:afdd6edf02b36460059db3ba7e58702b3" id="r_afdd6edf02b36460059db3ba7e58702b3"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#afdd6edf02b36460059db3ba7e58702b3">segment_handler_t</a>) (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *, size_t, void *)</td></tr>
<tr class="separator:afdd6edf02b36460059db3ba7e58702b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a554dbd9464384b72f9c3e72b9dcce8ee" id="r_a554dbd9464384b72f9c3e72b9dcce8ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a554dbd9464384b72f9c3e72b9dcce8ee">strnchr</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t len, unsigned char c)</td></tr>
<tr class="memdesc:a554dbd9464384b72f9c3e72b9dcce8ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">A length-safe version of strchr().  <br /></td></tr>
<tr class="separator:a554dbd9464384b72f9c3e72b9dcce8ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b19917fbf64f3a35a52d31ae5f6f76c" id="r_ga9b19917fbf64f3a35a52d31ae5f6f76c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__uri__parse.html#ga9b19917fbf64f3a35a52d31ae5f6f76c">coap_split_uri</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *str_var, size_t len, <a class="el" href="structcoap__uri__t.html">coap_uri_t</a> *uri)</td></tr>
<tr class="memdesc:ga9b19917fbf64f3a35a52d31ae5f6f76c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a given string into URI components.  <br /></td></tr>
<tr class="separator:ga9b19917fbf64f3a35a52d31ae5f6f76c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c99e399450162db911d50c8411722ab" id="r_a2c99e399450162db911d50c8411722ab"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a2c99e399450162db911d50c8411722ab">decode_segment</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *seg, size_t length, unsigned char *buf)</td></tr>
<tr class="memdesc:a2c99e399450162db911d50c8411722ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes percent-encoded characters while copying the string <code>seg</code> of size <code>length</code> to <code>buf</code>.  <br /></td></tr>
<tr class="separator:a2c99e399450162db911d50c8411722ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5cd1953aed32e942af08e39d396fb8fd" id="r_a5cd1953aed32e942af08e39d396fb8fd"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a5cd1953aed32e942af08e39d396fb8fd">check_segment</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t length, size_t *segment_size)</td></tr>
<tr class="memdesc:a5cd1953aed32e942af08e39d396fb8fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs through the given path (or query) segment and checks if percent-encodings are correct.  <br /></td></tr>
<tr class="separator:a5cd1953aed32e942af08e39d396fb8fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a39cbf2ed89a758ced3f9fecd125b50" id="r_a9a39cbf2ed89a758ced3f9fecd125b50"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a9a39cbf2ed89a758ced3f9fecd125b50">make_decoded_option</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t length, unsigned char *buf, size_t buflen, size_t *optionsize)</td></tr>
<tr class="memdesc:a9a39cbf2ed89a758ced3f9fecd125b50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a coap option from given string <code>s</code> to <code>buf</code>.  <br /></td></tr>
<tr class="separator:a9a39cbf2ed89a758ced3f9fecd125b50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4163dae83e43872640dc52914271306f" id="r_a4163dae83e43872640dc52914271306f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a4163dae83e43872640dc52914271306f">dots</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t len)</td></tr>
<tr class="memdesc:a4163dae83e43872640dc52914271306f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if path segment <code>s</code> consists of one or two dots.  <br /></td></tr>
<tr class="separator:a4163dae83e43872640dc52914271306f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a517b4456d0a079f5886599dccce09a2a" id="r_a517b4456d0a079f5886599dccce09a2a"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a517b4456d0a079f5886599dccce09a2a">coap_split_path_impl</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t length, <a class="el" href="uri_8c.html#afdd6edf02b36460059db3ba7e58702b3">segment_handler_t</a> h, void *data)</td></tr>
<tr class="memdesc:a517b4456d0a079f5886599dccce09a2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits the given string into segments.  <br /></td></tr>
<tr class="separator:a517b4456d0a079f5886599dccce09a2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7765779604c7c1166e99179722d4bdd8" id="r_a7765779604c7c1166e99179722d4bdd8"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a7765779604c7c1166e99179722d4bdd8">write_option</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t len, void *data)</td></tr>
<tr class="separator:a7765779604c7c1166e99179722d4bdd8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4a01c4a81338c39d0a2fb1e3859a6fb0" id="r_ga4a01c4a81338c39d0a2fb1e3859a6fb0"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__uri__parse.html#ga4a01c4a81338c39d0a2fb1e3859a6fb0">coap_split_path</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t length, unsigned char *buf, size_t *buflen)</td></tr>
<tr class="memdesc:ga4a01c4a81338c39d0a2fb1e3859a6fb0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits the given URI path into segments.  <br /></td></tr>
<tr class="separator:ga4a01c4a81338c39d0a2fb1e3859a6fb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga522cc4dfe723c2a3537f35ee2389ef74" id="r_ga522cc4dfe723c2a3537f35ee2389ef74"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__uri__parse.html#ga522cc4dfe723c2a3537f35ee2389ef74">coap_split_query</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *s, size_t length, unsigned char *buf, size_t *buflen)</td></tr>
<tr class="memdesc:ga522cc4dfe723c2a3537f35ee2389ef74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Splits the given URI query into segments.  <br /></td></tr>
<tr class="separator:ga522cc4dfe723c2a3537f35ee2389ef74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee99e6e8fd8df58150ec10e66c8dc265" id="r_aee99e6e8fd8df58150ec10e66c8dc265"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__uri__t.html">coap_uri_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#aee99e6e8fd8df58150ec10e66c8dc265">coap_new_uri</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *uri, unsigned int length)</td></tr>
<tr class="memdesc:aee99e6e8fd8df58150ec10e66c8dc265"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> object from the specified URI.  <br /></td></tr>
<tr class="separator:aee99e6e8fd8df58150ec10e66c8dc265"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad75ec78bfe175cd75f19d7e845c774f8" id="r_ad75ec78bfe175cd75f19d7e845c774f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__uri__t.html">coap_uri_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#ad75ec78bfe175cd75f19d7e845c774f8">coap_clone_uri</a> (const <a class="el" href="structcoap__uri__t.html">coap_uri_t</a> *uri)</td></tr>
<tr class="memdesc:ad75ec78bfe175cd75f19d7e845c774f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clones the specified <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> object.  <br /></td></tr>
<tr class="separator:ad75ec78bfe175cd75f19d7e845c774f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15d729f480a0de7dcf19c68f647a27e0" id="r_a15d729f480a0de7dcf19c68f647a27e0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a15d729f480a0de7dcf19c68f647a27e0">is_unescaped_in_path</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c)</td></tr>
<tr class="separator:a15d729f480a0de7dcf19c68f647a27e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe9cec4fe3abcf1606bc725bb54b009" id="r_a2fe9cec4fe3abcf1606bc725bb54b009"><td class="memItemLeft" align="right" valign="top"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a2fe9cec4fe3abcf1606bc725bb54b009">is_unescaped_in_query</a> (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> c)</td></tr>
<tr class="separator:a2fe9cec4fe3abcf1606bc725bb54b009"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af625b48713927c0c7cf9fb994ab7a7d4" id="r_af625b48713927c0c7cf9fb994ab7a7d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__string__t.html">coap_string_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#af625b48713927c0c7cf9fb994ab7a7d4">coap_get_query</a> (const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *request)</td></tr>
<tr class="separator:af625b48713927c0c7cf9fb994ab7a7d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11d902f573bcfee188d5ccd4903d0393" id="r_a11d902f573bcfee188d5ccd4903d0393"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcoap__string__t.html">coap_string_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uri_8c.html#a11d902f573bcfee188d5ccd4903d0393">coap_get_uri_path</a> (const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *request)</td></tr>
<tr class="separator:a11d902f573bcfee188d5ccd4903d0393"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a927de43a184102d0ee35c806be35999d" name="a927de43a184102d0ee35c806be35999d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a927de43a184102d0ee35c806be35999d">&#9670;&#160;</a></span>hexchar_to_dec</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define hexchar_to_dec</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">c</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates decimal value from hexadecimal ASCII character given in <code>c</code>. </p>
<p>The caller must ensure that <code>c</code> actually represents a valid heaxdecimal character, e.g. with isxdigit(3). </p>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00208">208</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a68adaae0c5438602147af6219cef3e9d" name="a68adaae0c5438602147af6219cef3e9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68adaae0c5438602147af6219cef3e9d">&#9670;&#160;</a></span>ISEQUAL_CI</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ISEQUAL_CI</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;  ((a) == (b) || (islower(b) &amp;&amp; ((a) == ((b) - 0x20))))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00049">49</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="ac6afabdc09a49a433ee19d8a9486056d" name="ac6afabdc09a49a433ee19d8a9486056d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6afabdc09a49a433ee19d8a9486056d">&#9670;&#160;</a></span>min</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define min</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;((a) &lt; (b) ? (a) : (b))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00326">326</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="ae7d65118c715792eb89f8fe03a45e210" name="ae7d65118c715792eb89f8fe03a45e210"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7d65118c715792eb89f8fe03a45e210">&#9670;&#160;</a></span>URI_DATA</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define URI_DATA</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">uriobj</td><td>)</td>
          <td>&#160;&#160;&#160;((unsigned char *)(uriobj) + sizeof(<a class="el" href="structcoap__uri__t.html">coap_uri_t</a>))</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00435">435</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="afdd6edf02b36460059db3ba7e58702b3" name="afdd6edf02b36460059db3ba7e58702b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdd6edf02b36460059db3ba7e58702b3">&#9670;&#160;</a></span>segment_handler_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* segment_handler_t) (const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *, size_t, void *)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00329">329</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a5cd1953aed32e942af08e39d396fb8fd" name="a5cd1953aed32e942af08e39d396fb8fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5cd1953aed32e942af08e39d396fb8fd">&#9670;&#160;</a></span>check_segment()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int check_segment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>segment_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Runs through the given path (or query) segment and checks if percent-encodings are correct. </p>
<p>This function returns <code>0</code> on success and <code>-1</code> on error. </p>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00245">245</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="ad75ec78bfe175cd75f19d7e845c774f8" name="ad75ec78bfe175cd75f19d7e845c774f8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad75ec78bfe175cd75f19d7e845c774f8">&#9670;&#160;</a></span>coap_clone_uri()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__uri__t.html">coap_uri_t</a> * coap_clone_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__uri__t.html">coap_uri_t</a> *&#160;</td>
          <td class="paramname"><em>uri</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clones the specified <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> object. </p>
<p>Thie function allocates sufficient memory to hold the <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> structure and its contents. The object must be released with <a class="el" href="mem_8h.html#a1e46a1505bb13f03fdacd5d1b32502a6" title="Wrapper function to coap_free_type() for backwards compatibility.">coap_free()</a>. </p>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00457">457</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="af625b48713927c0c7cf9fb994ab7a7d4" name="af625b48713927c0c7cf9fb994ab7a7d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af625b48713927c0c7cf9fb994ab7a7d4">&#9670;&#160;</a></span>coap_get_query()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__string__t.html">coap_string_t</a> * coap_get_query </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00512">512</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a11d902f573bcfee188d5ccd4903d0393" name="a11d902f573bcfee188d5ccd4903d0393"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11d902f573bcfee188d5ccd4903d0393">&#9670;&#160;</a></span>coap_get_uri_path()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__string__t.html">coap_string_t</a> * coap_get_uri_path </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcoap__pdu__t.html">coap_pdu_t</a> *&#160;</td>
          <td class="paramname"><em>request</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00562">562</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="aee99e6e8fd8df58150ec10e66c8dc265" name="aee99e6e8fd8df58150ec10e66c8dc265"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee99e6e8fd8df58150ec10e66c8dc265">&#9670;&#160;</a></span>coap_new_uri()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcoap__uri__t.html">coap_uri_t</a> * coap_new_uri </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>uri</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> object from the specified URI. </p>
<p>Returns the new object or NULL on error. The memory allocated by the new <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> must be released using <a class="el" href="mem_8h.html#a1e46a1505bb13f03fdacd5d1b32502a6" title="Wrapper function to coap_free_type() for backwards compatibility.">coap_free()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">uri</td><td>The URI path to copy. </td></tr>
    <tr><td class="paramname">length</td><td>The length of uri.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>New URI object or NULL on error. </dd></dl>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00438">438</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a517b4456d0a079f5886599dccce09a2a" name="a517b4456d0a079f5886599dccce09a2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a517b4456d0a079f5886599dccce09a2a">&#9670;&#160;</a></span>coap_split_path_impl()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static size_t coap_split_path_impl </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="uri_8c.html#afdd6edf02b36460059db3ba7e58702b3">segment_handler_t</a>&#160;</td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Splits the given string into segments. </p>
<p>You should call one of the macros <a class="el" href="group__uri__parse.html#ga4a01c4a81338c39d0a2fb1e3859a6fb0" title="Splits the given URI path into segments.">coap_split_path()</a> or <a class="el" href="group__uri__parse.html#ga522cc4dfe723c2a3537f35ee2389ef74" title="Splits the given URI query into segments.">coap_split_query()</a> instead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>The URI string to be tokenized. </td></tr>
    <tr><td class="paramname">length</td><td>The length of <code>s</code>. </td></tr>
    <tr><td class="paramname">h</td><td>A handler that is called with every token. </td></tr>
    <tr><td class="paramname">data</td><td>Opaque data that is passed to <code>h</code> when called.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of characters that have been parsed from <code>s</code>. </dd></dl>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00351">351</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a2c99e399450162db911d50c8411722ab" name="a2c99e399450162db911d50c8411722ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c99e399450162db911d50c8411722ab">&#9670;&#160;</a></span>decode_segment()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void decode_segment </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>seg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buf</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Decodes percent-encoded characters while copying the string <code>seg</code> of size <code>length</code> to <code>buf</code>. </p>
<p>The caller of this function must ensure that the percent-encodings are correct (i.e. the character '' is always followed by two hex digits. and that <code>buf</code> provides sufficient space to hold the result. This function is supposed to be called by <a class="el" href="uri_8c.html#a9a39cbf2ed89a758ced3f9fecd125b50" title="Writes a coap option from given string s to buf.">make_decoded_option()</a> only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">seg</td><td>The segment to decode and copy. </td></tr>
    <tr><td class="paramname">length</td><td>Length of <code>seg</code>. </td></tr>
    <tr><td class="paramname">buf</td><td>The result buffer. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00223">223</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a4163dae83e43872640dc52914271306f" name="a4163dae83e43872640dc52914271306f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4163dae83e43872640dc52914271306f">&#9670;&#160;</a></span>dots()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int dots </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks if path segment <code>s</code> consists of one or two dots. </p>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00335">335</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a15d729f480a0de7dcf19c68f647a27e0" name="a15d729f480a0de7dcf19c68f647a27e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15d729f480a0de7dcf19c68f647a27e0">&#9670;&#160;</a></span>is_unescaped_in_path()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int is_unescaped_in_path </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00499">499</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a2fe9cec4fe3abcf1606bc725bb54b009" name="a2fe9cec4fe3abcf1606bc725bb54b009"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fe9cec4fe3abcf1606bc725bb54b009">&#9670;&#160;</a></span>is_unescaped_in_query()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> int is_unescaped_in_query </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00508">508</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a9a39cbf2ed89a758ced3f9fecd125b50" name="a9a39cbf2ed89a758ced3f9fecd125b50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a39cbf2ed89a758ced3f9fecd125b50">&#9670;&#160;</a></span>make_decoded_option()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int make_decoded_option </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>buflen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>optionsize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Writes a coap option from given string <code>s</code> to <code>buf</code>. </p>
<p><code>s</code> should point to a (percent-encoded) path or query segment of a <a class="el" href="structcoap__uri__t.html" title="Representation of parsed URI.">coap_uri_t</a> object. The created option will have type <code>0</code>, and the length parameter will be set according to the size of the decoded string. On success, this function returns <code>0</code> and sets <code>optionsize</code> to the option's size. On error the function returns a value less than zero. This function must be called from <a class="el" href="uri_8c.html#a517b4456d0a079f5886599dccce09a2a" title="Splits the given string into segments.">coap_split_path_impl()</a> only.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>The string to decode. </td></tr>
    <tr><td class="paramname">length</td><td>The size of the percent-encoded string <code>s</code>. </td></tr>
    <tr><td class="paramname">buf</td><td>The buffer to store the new coap option. </td></tr>
    <tr><td class="paramname">buflen</td><td>The maximum size of <code>buf</code>. </td></tr>
    <tr><td class="paramname">optionsize</td><td>The option's size.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>0</code> on success and <code>-1</code> on error.</dd></dl>
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd>This function does not split segments that are bigger than 270 bytes. </dd></dl>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00286">286</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a554dbd9464384b72f9c3e72b9dcce8ee" name="a554dbd9464384b72f9c3e72b9dcce8ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a554dbd9464384b72f9c3e72b9dcce8ee">&#9670;&#160;</a></span>strnchr()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="libcoap_8h.html#a58b4446dccd0b8c21b3532ef6b77a57d">COAP_STATIC_INLINE</a> const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> * strnchr </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>c</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A length-safe version of strchr(). </p>
<p>This function returns a pointer to the first occurrence of <code>c</code> in <code>s</code>, or <code>NULL</code> if not found.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>The string to search for <code>c</code>. </td></tr>
    <tr><td class="paramname">len</td><td>The length of <code>s</code>. </td></tr>
    <tr><td class="paramname">c</td><td>The character to search.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to the first occurence of <code>c</code>, or <code>NULL</code> if not found. </dd></dl>

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00042">42</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
<a id="a7765779604c7c1166e99179722d4bdd8" name="a7765779604c7c1166e99179722d4bdd8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7765779604c7c1166e99179722d4bdd8">&#9670;&#160;</a></span>write_option()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void write_option </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="uri_8c_source.html#l00385">385</a> of file <a class="el" href="uri_8c_source.html">uri.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="uri_8c.html">uri.c</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
